<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<script type="text/javascript" src="js/jquery-1.12.4.js"></script>
	<script type="text/javascript">
		$(function() {
			$("#none").css("display", "none");
			$("table tr:even").css("background", "#ffc107");
		})
		function testing() {
			if($("#name").val()==""){
				alert("姓名不能为空");
				return false;
			}
			if($("#age").val()==""){
				alert("年龄不能为空");
				return false;
			}
			return true;
		}
	</script>

	<div align="center">
		<form action="UpdateServlet" method="post" onsubmit="testing() ">

			<table border="1" align="center">
				<tr>
					<th colspan="5">会员信息</th>
				</tr>
				<tr id="none">
					<td>编号</td>
					<td><input type="text" value="${requestScope.mInfo.id }"
						name="id"></td>
				</tr>
				<tr>
					<td>姓名</td>
					<td><input type="text" value="${requestScope.mInfo.mName }"
						name="name" id="name"></td>
				</tr>
				<tr>
					<td>性别</td>
					<td><input type="radio" name="gender" value="男"
						<c:if test="${requestScope.mInfo.mGender == '男'}" >
					checked="checked"
					</c:if>>男

						<input type="radio" name="gender" value="女"
						<c:if test="${requestScope.mInfo.mGender == '女'}" >
					checked="checked"
					</c:if>>女
					</td>
				</tr>
				<tr>
					<td>年龄</td>
					<td><input type="text" value="${requestScope.mInfo.mAge }"
						name="age" id="age"></td>
					
				</tr>
				<tr>
					<td>家庭住址</td>
					<td><input type="text" value="${requestScope.mInfo.mAddress }"
						name="address"></td>
				</tr>
				<tr>
					<td>Email</td>
					<td><input type="text" value="${requestScope.mInfo.mEmail }"
						name="email"></td>
				</tr>
				<tr>
					<td>
						<input type="submit" value="修改" >
						<input type="reset" value="重置"> 
					</td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>